// Расширяем JQuery функцией поворота
$.fn.cssRotate = function(deg) {
    return this.each(function() {
        var rad = (deg * Math.PI) / 180.0;
        cos = Math.cos(rad),
        sin = Math.sin(rad);
    
        $(this).css({
            "-moz-transform": "rotate(" + deg + "deg)",
            "-moz-transform-origin": "top left",
            "-o-transform": "rotate(" + deg + "deg)",
            "-o-transform-origin": "top left",
            "-webkit-transform": "rotate(" + deg + "deg)",
            "-webkit-transform-origin": "top left",
            "-ms-transform": "rotate(" + deg + "deg)",
            "-ms-transform-origin": "top left",
            "transform": "rotate(" + deg + "deg)",
            "transform-origin": "top left",
            "-ms-filter": "progid:DXImageTransform.Microsoft.Matrix(M11='" + cos + "', M12='" + (-sin) + "', M21='" + sin + "', M22='" + cos + "',sizingMethod='auto expand')",
            "filter": "progid:DXImageTransform.Microsoft.Matrix(M11='" + cos + "', M12='" + (-sin) + "', M21='" + sin + "', M22='" + cos + "', sizingMethod='auto expand')",
            "zoom": "1"
        });
    });
};